package com.qf.jie.entity.vo;

import java.util.Date;

public class RespBean {
    private int status;
    private String msg;
    private Object data;

    private RespBean(int status, String msg, Object data) {
        this.status = status;
        this.msg = msg;
        this.data = data;
    }
    public static RespBean respSuccess(String msg, Object data){
        return new RespBean(200,msg,data);
    }

    public static RespBean respSuccess(String msg){
        return new RespBean(200,msg,null);
    }

    public static RespBean respSuccess(Object data){
        return new RespBean(200,null,data);
    }

    public static RespBean respError(String msg, Object data){
        return new RespBean(500,msg,data);
    }

    public static RespBean respError(String msg){
        return new RespBean(500,msg,null);
    }

    public static RespBean respError(Object data){
        return new RespBean(500,null,data);
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

}
